import React, { useRef } from 'react'

function Chuangjian() {
  const refs=useRef<HTMLButtonElement>(null)
  const onclicks=()=>{
     console.log(refs) 
    setTimeout(()=>{
      refs.current.disabled=true
    },3000)
  }
  return ( 
    <div> 
        <button ref={refs} onClick={onclicks}>点击</button>
    </div>
  )
}

export default Chuangjian
 